package com.yc.bran.snack.bean;

public class GoodsTypeSales {
	private String tname;  
	private int totalSales;  
	private double salesPercentage;

	public GoodsTypeSales() {
		super();
	}
	public GoodsTypeSales(String tname, int totalSales, double salesPercentage) {
		super();
		this.tname = tname;
		this.totalSales = totalSales;
		this.salesPercentage = salesPercentage;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		long temp;
		temp = Double.doubleToLongBits(salesPercentage);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		result = prime * result + ((tname == null) ? 0 : tname.hashCode());
		result = prime * result + totalSales;
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		GoodsTypeSales other = (GoodsTypeSales) obj;
		if (Double.doubleToLongBits(salesPercentage) != Double.doubleToLongBits(other.salesPercentage))
			return false;
		if (tname == null) {
			if (other.tname != null)
				return false;
		} else if (!tname.equals(other.tname))
			return false;
		if (totalSales != other.totalSales)
			return false;
		return true;
	}
	@Override
	public String toString() {
		return "GoodsTypeSales [tname=" + tname + ", totalSales=" + totalSales + ", salesPercentage=" + salesPercentage
				+ "]";
	}
	public String getTname() {
		return tname;
	}
	public void setTname(String tname) {
		this.tname = tname;
	}
	public int getTotalSales() {
		return totalSales;
	}
	public void setTotalSales(int totalSales) {
		this.totalSales = totalSales;
	}
	public double getSalesPercentage() {
		return salesPercentage;
	}
	public void setSalesPercentage(double salesPercentage) {
		this.salesPercentage = salesPercentage;
	} 


}
